<template>
  <div class="block">
    <span class="demonstration">显示总数</span>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page.sync="currentPage1"
      :page-size="size"
      layout="total, prev, pager, next"
      :total="total">
    </el-pagination>
  </div>
</template>
<script>
	export default {
		props:['total','size'],

   data() {
      return {
        currentPage1: 1,
        currentPage2: 5,
        currentPage3: 5,
        currentPage4: 4
      }
    },
 
    methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
      	console.log(val)
        this.$emit('handlePageChange',val)
      }
    }
}
	
</script>